﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="IssueItemShortClose.aspx.cs" Inherits="Main_Inventory_IssueItemShortClose" %>
<%@ Register Src="~/User Controls/PageHeading.ascx" TagName="heading" TagPrefix="acc" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="AjaxControl" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
    <link rel="Stylesheet" href="../../Styles/accounts.css" type="text/css" />
    <link href="../../Styles/HorizontalTab.css" rel="stylesheet" type="text/css" />
    <style type="text/css">
        .modalPopUpBackground
        {
            background-color: #E4E4E4;
            filter: alpha(opacity=40);
            opacity: 0.7;
            xindex: -1;
        }
        .PanelBg
        {
            background-image: -webkit-gradient(linear,left top,left bottom,color-stop(0, #A8FCB4),color-stop(0.77, #6AB638));
            background: #6AB638;
            background-image: -o-linear-gradient(bottom, #A8FCB4 0%, #6AB638 77%);
            background-image: -moz-linear-gradient(bottom, #A8FCB4 0%, #6AB638 77%);
            background-image: -webkit-linear-gradient(bottom, #A8FCB4 0%, #6AB638 77%);
            background-image: -ms-linear-gradient(bottom, #A8FCB4 0%, #6AB638 77%);
            background-image: linear-gradient(to bottom, #A8FCB4 0%, #6AB638 77%);
        }
    </style>
    <script type="text/javascript">
        function divExpandCollapse(divname) {
            var div = document.getElementById(divname);
            var img = document.getElementById('img' + divname);
            if (div.style.display == "none") {
                div.style.display = "inline";
                img.src = "../../Menu/images/minus.gif";
            }
            else {
                div.style.display = "none";
                img.src = "../../Menu/images/plus.gif";
            }
        }
    </script>
</head>
<body>
    <form id="form1" runat="server">
    <div>
        <asp:ScriptManager ID="SEM" runat="server">
        </asp:ScriptManager>
        <acc:heading ID="pagehead" runat="server" HeadingText="Issue Item Short Close" />
        <div style="margin-left: 40%;">
            <asp:Label ID="lblmsg" runat="server"></asp:Label>
        </div>
        <asp:UpdatePanel ID="updategrid" runat="server">
            <ContentTemplate>
                 <div id="DivIssueItemShortClose" runat="server" visible="false" style="margin-left: 1%; margin-top:10px;">
                    <asp:GridView ID="grdIssueItemShortClose" runat="server"
                        AutoGenerateColumns="false" OnRowDataBound="grdIssueItemShortClose_RowDataBound" CssClass="gridview" Width="99%">
                        <Columns>
                            <asp:TemplateField HeaderText="Sr.no" ItemStyle-Width="5%">
                                <ItemTemplate>
                                    <%#Container.DataItemIndex + 1%>
                                    <a href="Javascript:divExpandCollapse('div<%# Eval("RegId") %>');">
                                        <img id="imgdiv<%#Eval("RegId") %>" width="9px" border="0" src="../../Menu/images/plus.gif" />
                                    </a>
                                </ItemTemplate>
                            </asp:TemplateField>
                            <asp:TemplateField ItemStyle-Width="5%">
                                <ItemTemplate>
                                    <asp:CheckBox ID="ChkItem" runat="server" AutoPostBack="true" Checked='<%#Eval("ItemShortClose")%>'
                                        OnCheckedChanged="ChkItem_CheckedChanged" />
                                    <asp:HiddenField ID="hiditemissue" runat="server" Value='<%#Bind("RegId")%>'/>
                                    <AjaxControl:ModalPopupExtender ID="MPEISSUEITEM" runat="server" PopupControlID="pnlItemIssue"
                                        BackgroundCssClass="modalPopUpBackground" TargetControlID="hiditemissue">
                                    </AjaxControl:ModalPopupExtender>
                                </ItemTemplate>
                            </asp:TemplateField>   
                             <asp:TemplateField HeaderText="Slip No" ItemStyle-Width="10%">
                                <ItemTemplate>
                                    <asp:Label ID="lblslipNo" runat="server" Text='<%#Bind("slipno")%>'></asp:Label>
                                </ItemTemplate>
                            </asp:TemplateField> 
                            <asp:TemplateField HeaderText="Short Close Date" ItemStyle-Width="10%">
                                <ItemTemplate>
                                    <asp:Label ID="lblshortclosedate" runat="server" Text='<%#Bind("ShortcloseDate","{0:dd-MMM-yyyy}")%>'></asp:Label>
                                </ItemTemplate>
                            </asp:TemplateField> 
                            <asp:TemplateField HeaderText="Remarks" ItemStyle-Width="30%">
                                <ItemTemplate>
                                    <asp:Label ID="lblshortcloseRemarks" runat="server" Text='<%#Bind("shortclose_remark")%>'></asp:Label>
                                </ItemTemplate>
                            </asp:TemplateField>                           
                            <asp:TemplateField HeaderText="Issued By" ItemStyle-Width="15%">
                                <ItemTemplate>
                                    <asp:Label ID="lblIssueQty" runat="server" Text='<%#Bind("Issued_By")%>'></asp:Label>
                                </ItemTemplate>
                            </asp:TemplateField>
                            <asp:TemplateField HeaderText="Issued To" ItemStyle-Width="15%">
                                <ItemTemplate>
                                    <asp:Label ID="lblRetrunqty" runat="server" Text='<%#Bind("Issued_to")%>'></asp:Label>
                                </ItemTemplate>
                            </asp:TemplateField>
                            <asp:TemplateField HeaderText="Requester Name" ItemStyle-Width="10%">
                                <ItemTemplate>
                                    <asp:Label ID="lblIssueDate" runat="server" Text='<%#Bind("username")%>'></asp:Label>
                                </ItemTemplate>
                            </asp:TemplateField>
                            <asp:TemplateField>
                                <ItemTemplate>
                                    <tr>
                                        <td colspan="100%">
                                            <div id="div<%# Eval("RegId") %>" style="display:none; position:relative;left:15px; overflow:auto">
                                                <asp:GridView ID="gvPOShortChild" runat="server" CssClass="gridview" AutoGenerateColumns="false" Width="96%">                                                    
                                                    <Columns>
                                                        <asp:TemplateField HeaderText="S.No">
                                                            <ItemTemplate>
                                                                <%# Container.DataItemIndex+1 %>
                                                            </ItemTemplate>
                                                        </asp:TemplateField>
                                                        <asp:BoundField DataField="ItemCode" HeaderText="Item Code" />
                                                        <asp:BoundField DataField="ITEMDESC" HeaderText="Item Name" />
                                                        <%--<asp:BoundField DataField="ItemQty" HeaderText="Item Qty" ItemStyle-HorizontalAlign="Right" DataFormatString="{0:0}" />
                                                        <asp:BoundField DataField="ItemReceive" HeaderText="Item Receive" ItemStyle-HorizontalAlign="Right" DataFormatString="{0:0}" />                                                        
                                                        <asp:BoundField DataField="BalanceItem" HeaderText="Balance Item Qty" ItemStyle-HorizontalAlign="Right" DataFormatString="{0:0}" />--%>
                                                    </Columns>
                                                </asp:GridView>
                                            </div>
                                        </td>
                                    </tr>
                                </ItemTemplate>
                            </asp:TemplateField>
                        </Columns>
                    </asp:GridView>
                    <asp:Panel ID="pnlItemIssue" CssClass="PanelBg" Width="30%" BorderWidth="17" BorderStyle="Solid"
                        BorderColor="White" runat="server">
                        <table width="100%">
                            <tr>
                                <td colspan="4">
                                    <div style="position: relative; top: -18px; left: 95%; width: 27px;">
                                        <asp:LinkButton ID="btnCancel" runat="server" Text="Close" 
                                            onclick="btnCancel_Click" />
                                    </div>
                                </td>
                            </tr>
                            <tr>
                                <td width="10%">
                                </td>
                                <td width="10%">
                                    Remarks
                                </td>
                                <td width="70%">
                                </td>
                                <td width="10%">
                                </td>
                            </tr>
                            <tr>
                                <td>
                                    &nbsp;
                                </td>
                                <td colspan="2">
                                    <asp:TextBox ID="txtShortCloseRemarks" runat="server" TextMode="MultiLine" Width="260px"
                                        Height="80px"></asp:TextBox>
                                </td>
                                <td>
                                    &nbsp;
                                </td>
                            </tr>
                            <tr>
                                <td colspan="4" align="center">
                                    <asp:Button ID="btnshortcloseIssueitem" runat="server" Text="Save" CssClass="button"
                                        OnClick="btnshortcloseIssueitem_Click" />                                    
                                </td>
                            </tr>
                        </table>
                    </asp:Panel>
                </div>
            </ContentTemplate>
        </asp:UpdatePanel>
    </div>
    </form>
</body>
</html>
